﻿namespace WeixinPay.Business
{
    using Kevin.Shop.Business.Core.Components.Responser;
    using Kevin.Shop.Business.SalesManagement.Components.Order;
    using Kevin.Shop.Business.Service.Entity.Helper;
    using Kevin.Shop.Business.Service.Entity.SalesManagement.Order;
    using System;
    using System.Configuration;

    public class ServiceHelper
    {
        public static ServiceResponser CreateOrderPaymentInfo(OrderPaymentInfo info)
        {
            string str = ConfigurationManager.AppSettings["Service_CreateOrderPaymentInfo"];
            return RestfulHelper.Update<OrderPaymentInfo>(str, info);
        }

        public static OrderBasicInfo GetOrderDetailInfo(string orderNumber)
        {
            return (RestfulHelper.QueryWithSingle<OrderBasicInfo>(string.Format(ConfigurationManager.AppSettings["Service_GetOrderDetailInfo"], orderNumber), new object[0]) ?? new OrderBasicInfo());
        }
    }
}

